package com.icangya.domain;

import javax.persistence.*;
import java.sql.Timestamp;

@Entity
@Table(name = "red_packet_record")
public class RedPacketRecord {//拆红包明细记录表

    private long id;//编号

    private long uid;//用户id

    private String userName;//用户昵称

    private String headImgUrl;//用户头像

    private long orderId;//订单编号

    private long orderCount;//订单数量

    private long goodsId;//商品编号

    private String goodsName;//商品名称

    private long redPacketId;//红包奖励id

    private String redPacketAward;//红包奖励

    private long status;//红包领取状态    0：领取  1:未领取

    private String statusString;//红包领取状态 （文本显示）

    /**
     * 时间
     */
    private Timestamp createTime;


    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "uid")
    public long getUid() {
        return uid;
    }

    public void setUid(long uid) {
        this.uid = uid;
    }
    @Basic
    @Column(name = "user_name")
    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }
    @Basic
    @Column(name = "head_imgUrl")
    public String getHeadImgUrl() {
        return headImgUrl;
    }

    public void setHeadImgUrl(String headImgUrl) {
        this.headImgUrl = headImgUrl;
    }
    @Basic
    @Column(name = "order_id")
    public long getOrderId() {
        return orderId;
    }

    public void setOrderId(long orderId) {
        this.orderId = orderId;
    }
    @Basic
    @Column(name = "order_count")
    public long getOrderCount() {
        return orderCount;
    }

    public void setOrderCount(long orderCount) {
        this.orderCount = orderCount;
    }
    @Basic
    @Column(name = "goods_id")
    public long getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(long goodsId) {
        this.goodsId = goodsId;
    }
    @Basic
    @Column(name = "goods_name")
    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    @Basic
    @Column(name = "red_packet_id")
    public long getRedPacketId() {
        return redPacketId;
    }

    public void setRedPacketId(long redPacketId) {
        this.redPacketId = redPacketId;
    }
    @Basic
    @Column(name = "red_packet_award")
    public String getRedPacketAward() {
        return redPacketAward;
    }

    public void setRedPacketAward(String redPacketAward) {
        this.redPacketAward = redPacketAward;
    }

    @Basic
    @Column(name = "status")
    public long getStatus() {
        return status;
    }

    public void setStatus(long status) {
        this.status = status;
    }
    @Basic
    @Column(name = "status_string")
    public String getStatusString() {
        return statusString;
    }

    public void setStatusString(String statusString) {
        this.statusString = statusString;
    }

    @Basic
    @Column(name = "create_time")
    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }


    public RedPacketRecord() {
    }

    public RedPacketRecord(long uid, String userName, String headImgUrl, long orderId, long orderCount, long goodsId, String goodsName,
                           long redPacketId, String redPacketAward, long status, String statusString, Timestamp createTime) {
        this.uid = uid;
        this.userName = userName;
        this.headImgUrl = headImgUrl;
        this.orderId = orderId;
        this.orderCount = orderCount;
        this.goodsId = goodsId;
        this.goodsName = goodsName;
        this.redPacketId = redPacketId;
        this.redPacketAward = redPacketAward;
        this.status = status;
        this.statusString = statusString;
        this.createTime = createTime;
    }
}
